<?php
/*
 * Copyright Domenic Helfenstein
 */
if($site!='add-event') {
   header('Content-Type: application/xhtml+xml; charset=utf-8');
}

function getNavLink($name, $site, $currentSite) {
   $nav = '<li';
   if ($site == $currentSite) {
      $nav .= ' class="active"';
   }
   $nav .= '><a href="?site=' . $site . '">' . $name . '</a></li>' . "\n";
   return $nav;
}
?>
<!DOCTYPE html>
<?php if($site!='add-event'): ?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html5="http://www.w3.org/1999/xhtml" xml:lang="de">
<?php else: ?>
<html lang="de">
<?php endif; ?>
   <head>
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1" />
      <title>Kongresszentrum Horw</title>

      <!-- Bootstrap -->
      <link href="css/bootstrap.css" rel="stylesheet" />
      <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
      <link rel="stylesheet" type="text/css" href="datetimepicker/jquery.datetimepicker.css" />
      <link href="css/custome.css" rel="stylesheet" />
   </head>
   <body>
      <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
         <div class="container">
            <div class="navbar-header">
               <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                  <span class="sr-only">Toggle navigation</span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
               </button>
            </div>
            <div class="collapse navbar-collapse">
               <ul class="nav navbar-nav">
                  <?php echo getNavLink('Home', 'home', $site); ?>
                  <?php echo getNavLink('PDF', 'pdf', $site); ?>
                  <?php echo getNavLink('Animation', 'animation', $site); ?>
                  <?php echo getNavLink('Event erfassen', 'add-event', $site); ?>
               </ul>
            </div>
         </div>
      </div>

      <div class="main">
         <?php echo $content; ?>
      </div>
      <div class="foot">
         <p>
            Die Seiten (ausser Event erfassen wegen des Date-Time-Pickers) sind valides XHTML5. <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fgastro-project.philippjenni.ch">Validation- Check</a>
         </p>
      </div>

      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
      <script src="js/bootstrap.min.js"></script>
      <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
      <script src="datetimepicker/jquery.datetimepicker.js"></script>
      <script src="js/bootstrap.file-input.js"></script>
      <script>
         $(function() {
            $(".datetime").datetimepicker({
               lang:'de',
               i18n:{
                de:{
                 months:[
                  'Januar','Februar','März','April',
                  'Mai','Juni','Juli','August',
                  'September','Oktober','November','Dezember',
                 ],
                 dayOfWeek:[
                  "So.", "Mo", "Di", "Mi", 
                  "Do", "Fr", "Sa.",
                 ]
                }
               },
               timepicker:true,
               format:'d.m.Y H:i',
               formatTime:'H:i'
              });
              
              $('input[type=file]').bootstrapFileInput();
              $('.file-inputs').bootstrapFileInput();
         });
         $('.dt-button').click(function(){
            $(this).parent().find('.datetime').datetimepicker('show');
         });
      </script>
   </body>
</html>